package com.zhuiYun.project.api.syslog.controller;

import com.zhuiYun.project.api.syslog.entity.SysUser;
import com.zhuiYun.project.api.syslog.service.SysService;
import com.zhuiYun.project.common.response.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @ClassName SysController
 * @Description TODO 控制层
 * @Author wuwan
 * @Date 2023/8/11 15:02
 **/
@RestController
@CrossOrigin
@RequestMapping("/Sys")
public class SysController {
    @Autowired
    private SysService sysService;

    @GetMapping("/Sysqueryall")
    public CommonResult Sysqueryall(){
        CommonResult sysqueryall = sysService.sysqueryall();
        return CommonResult.ok(sysqueryall);
    }
    /*
    * @Author wuwan
    * @Description 添加方法
    * @Date 2023/8/11 15:16
    * @Return 
    * @param null
    */
    @PostMapping("Sysinsert")
    public CommonResult sysinsert(MultipartFile file,SysUser sysUser){
        CommonResult sysinsert = sysService.Sysinsert(file,sysUser);
        return CommonResult.ok(sysinsert);
    }

//    @PostMapping("/Sysupdate")
//    public CommonResult sysfile(MultipartFile file,SysUser sysUser){
//
//        return CommonResult.ok();
//    }

}
